package com.gitpull.service.serviceImpl;

import com.gitpull.mapper.studentMapper;
import com.gitpull.pojo.student;
import com.gitpull.pojo.studentVO;
import com.gitpull.service.studentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class studentServiceImpl implements studentService {
    @Autowired
    private studentMapper studentMapper;

    @Override
    public List<List<studentVO>> getInfo() {
        List<student> students = studentMapper.studentNumber();
        List<List<studentVO>> studentVOS = new ArrayList<>();
        for (student student : students) {
            List<studentVO> studentVO = studentMapper.getStudentInfo(student.getStudentNumber());
            studentVOS.add(studentVO);
        }
        return studentVOS;
    }
}
